package com.tulele.vtool.service;

import com.github.pagehelper.PageInfo;
import com.tulele.vtool.model.BargainParticipantsInfo;
import com.tulele.vtool.model.PlatformActivityInfo;
import com.tulele.vtool.model.UserBargainActivityInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface IUserBargainActivityService {

    /**
     * 获取平台砍价活动信息
     * @param actType
     * @return
     */
    PlatformActivityInfo getPlatformBargainActivityInfo(Integer actType);

    /**
     * 获取用户对砍价活动的参与状态
     * @param userId
     * @param bargainActId
     * @return
     */
    int getUserParticipateActStatus(@Param("userId")Integer userId, @Param("bargainActId")Integer bargainActId);

    /**
     * 参与砍价活动
     * @param actInitUserId
     * @param participateUserId
     * @param bargainActId
     * @param bargainAmount
     * @return
     */
    int participateBargainActivity(int actInitUserId, int participateUserId, int bargainActId, int bargainAmount);

    /**
     * 查询用户砍价活动信息
     * @param bargainActId
     * @return
     */
    UserBargainActivityInfo getUserBargainActInfo(Integer bargainActId);

    /**
     * 查询用户对应活动的砍价金额
     * @param userId
     * @param bargainActId
     * @return
     */
    Integer getUserBargainAmountByActId(Integer userId, Integer bargainActId);

    /**
     * 根据砍价活动ID获取最新砍价的3名用户信息
     * @param bargainActId
     * @return
     */
    List<BargainParticipantsInfo> getSpecialSizeBargainParticipantsInfoByActId(Integer bargainActId);

    /**
     * 根据砍价活动ID获取对应参与者信息
     * @param bargainActId
     * @return
     */
    PageInfo<BargainParticipantsInfo> getBargainParticipantsInfoByActId(Integer bargainActId, int pageNum, int pageSize);

}
